<?php
$userid = $_GET['userid'];
$newname = $_GET['newname'];
if($userid == '' || $newname == ''){
	die('参数错误');
}
require_once('../../cofd/common.php');
$sql = "update exam_user set js=? where id=?";
$stmt = $conn->prepare($sql);
$stmt->bind_param('ss', $newname, $userid);
if($stmt->execute()){
	echo json_encode(array('status' => 200, 'msg' => '修改成功'));
}else{
	echo json_encode(array('status' => 400, 'msg' => '修改失败'));
}
$stmt->close();
$conn->close();
?>
